<script>on mouseUpglobal SDFileout, msglocglobal theLogset hilite of me to truepush cardpop card into SDCard -- don't leave it in the stack in caseput empty into theLog-- the target stack clobbers itanswer file "Stack to dump:" of type "STAK"if it ≠ empty thenput it into targetStackput "Dumped Scripts Data" into defaultNameask file "Output file:" with defaultNameif it ≠ empty thenput it into SDFileoutopen file SDFileoutget ChangeFileType(SDFileout, "TEXT", "MSWD")go stack targetStack in a new windowtoComputer -- locks everythingset cursor to busy-- dump the stack properties and scriptwritestr "Item"&tab&"Name"&tab&"Props"&tab&"Script"&returnget "Stack" & tab & short name of this stack & tabput "Dumping scripts of"&&it into msgwritestr itwritestr StackProperties() & tabdumpScripts this, Stack-- now dump each backgroundput number of backgrounds into Nbgrepeat with i = 1 to Nbggo first cd of bg iget "Background " & i & tab & short name of this bg & tabput it into msgwritestr itwritestr BgProperties() & tabdumpScripts "this", "Background"-- now dump each bg button and each bg fielddumpScripts "Background", "button"dumpScripts "Background", "field"-- dump each card within this backgroundput number of cards of this bg into Ncdrepeat with j = 1 to Ncdgo to card j of this bgput CdProperties() into CdPropsif CDProps & the script of this card is empty then next repeatget "Card "&j&" of background "&i&": "&short name of this bg&¬" (card "&number of this card&")"&¬tab & short name of this cd & tab & CdProps & tabput it into msgwritestr itdumpScripts "this", "Card"dumpScripts "Card", "button"dumpScripts "Card", "field"end repeatend repeatclose file SDFileoutend ifend ifgo to SDCardif thelog ≠ empty thenput return&theLog into bg field "Bg Names"put "Data file:"&return&SDFileout into bg field "Output files"repeat with i = 1 to number of lines in theLogput return after bg field "Output files" -- to make it scrollable!end repeatend ifset hilite of me to falseend mouseUpon dumpScripts place, objectglobal theLogif place is "this" thendo "get the script of this "&objectif it is empty then writestr "<No "&object&" script>"elseput place&&object&":"&number of lines of it&&"lines"&return ¬after theLogWriteScript(it)end ifwritestr returnelsedo "put the number of "&place&&object&"s into Nob"if Nob > 0 thenput place&&object&&Nob into msgrepeat with i = 1 to Nobdo "get the script of "&place&&object&&iif it is empty then next repeatput place&&object&":"&number of lines of it&&"lines"&return ¬after theLogdo "put the short name of "&place&&object&&i&" into theName"writestr place&&object&&i&tab&theName&tabwritestr Visible(place, object, i) & tabWriteScript(it)writestr returnend repeatend ifend ifend dumpScriptsFunction StackPropertiesreturn plural(number of cards, "card") & "; "¬& plural(number of backgrounds, "background") & "."end StackPropertiesFunction BgPropertiesreturn plural(number of cards of this bg, "card") & "; "¬& plural(number of bg buttons, "background button") & "; "¬& plural(number of bg fields, "background field") & "."end BgPropertiesFunction CdPropertiesput number of cd fields into NFldsput number of cd buttons into NBtnsif Nflds = 0 and NBtns = 0 then return emptyreturn plural(NBtns, "card button") & "; "¬& plural(NFlds, "card field") & "."end CdPropertiesFunction Visible place, object, ndo "get the visible of "&place&&object&&nif it is true then return "Visible."else return "Hidden."end Visible</script>
</part>
<part>
<id>10</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>340</left>
<top>27</top>
<right>505</right>
<bottom>49</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Dump fields</name>
<script>on mouseUpglobal SDFileout-- the target stack clobbers itset hilite of me to trueanswer file "Stack to dump:" of type "STAK"if it ≠ empty thenput "Data file:" into bg fld "Output Files"put "Background:" into bg fld "Bg Names"put it into targetStackpush cdpop card into SDCardgo stack targetStack in a new windowtoComputer -- locks everythingput number of backgrounds into nrepeat with i = 1 to ngo first cd of bg iput the number of bg fields into NFieldsput the number of cards of this bg into NCardsput the short name of this background into BgNameput "Background "&i&": "&BgName&&¬(number of cards of this bg) && "cards,"¬&& Nfields && "bg fields" into msgbeepif Nfields = 0 thenanswer "This background has no bg fields." with "ok"next repeatend ifif it is "cancel" then exit repeatask file "Text fields from this background to file:" with ¬BgName&".data"push cardgo to SDCardput return&BgName&": "&NCards&&"cards" after bg fld "Bg Names"put return&LastSegment(":", it) after bg fld "Output Files"pop cardif it is empty then next repeatelse put it into SDFileoutif outFiles ≠ empty then put return after outFilesput it after outFilesopen file SDFileoutget ChangeFileType(SDFileout, "TEXT", "MSWD")repeat with j = 1 to Nfieldswritestr "Field" & jif j = NFields then writestr returnelse writestr tabend repeatlock screenrepeat with c = 1 to NCardsset cursor to busygo to card c of this bgdumpBgFields Nfieldsend repeatunlock screenclose file SDFileoutend repeatdoMenu "Close Stack"toUsergo to SDCardend ifset hilite of me to falseend mouseUpon dumpBgFields Nfieldsrepeat with i = 1 to NfieldsWriteText(bg field i)if i ≠ Nfields then writestr tabelse writestr returnend repeatput the number of this card into msgend dumpBgFields</script>
</part>
<part>
<id>12</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>11</left>
<top>103</top>
<right>267</right>
<bottom>219</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>forceLeft</textAlign>
<font>Geneva</font>
<textSize>10</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>Bg Names</name>
<script></script>
</part>
<part>
<id>16</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>250</left>
<top>103</top>
<right>496</right>
<bottom>219</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>forceLeft</textAlign>
<font>Geneva</font>
<textSize>10</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>Output files</name>
<script></script>
</part>
<part>
<id>18</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>397</left>
<top>0</top>
<right>426</right>
<bottom>31</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>27056</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Unlock *help*</name>
<script>on mouseUpdoUnlockend mouseUp</script>
</part>
<part>
<id>19</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>444</left>
<top>0</top>
<right>462</right>
<bottom>18</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>26635</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>dohelp</name>
<script>on mouseUpdoHelpend mouseUp</script>
</part>
<part>
<id>20</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>479</left>
<top>103</top>
<right>496</right>
<bottom>340</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Scroll bar</name>
<script>on mousedownglobal lastLocput mouseloc() into lastLoc -- captures this position for use in a 'drag' operationset cursor to arrow -- 'cos that's how it is in the real scroll barend mousedownon mouseUpglobal lastLoc, STMasterField, STSlaveFieldsif STMasterField is empty or STSlaveFields is empty thengetSTFields name of meend ifhide me -- by hiding the transparent button, we let the 'drag' go through to the master field--lock screen -- optional; if you don't, the fields don't all scroll simultaneously,-- if you do, the scrolling is sluggishget mouseloc()drag from lastLoc to it -- this does the business on the master fieldrepeat with i = 1 to number of items in STSlaveFields -- set scroll of slave fields to the master field's scrolldo "set scroll of"&& item i of STSlaveFields&&"to scroll of"¬&&STMasterFieldend repeat--unlock screen -- see aboveshow me -- puts the transparent 'guard' back in placeend mouseUpon getSTFields guardButton-- the master field is the highest-numbered scrolling field-- in the same layer (card/background)-- that is under the guard button-- the slave fields are all of the scrolling fields of the same layer-- that underly the master field or the previous slave fieldglobal STMasterField, STSlaveFieldsif guardButton contains "card" then put "card" into theLayerelse put "background" into theLayerput empty into STSlaveFieldsput empty into STMasterFieldrepeat with i = 1 to value("number of"&&theLayer&&"fields")if loc of guardButton is within¬value ("rect of" &&theLayer&&"field"&&i) thenput theLayer&&"field id"&&value("id of"&&theLayer&&"field"&&i) ¬into STMasterFieldend ifend repeatput STMasterField into lastSlaverepeat with i = number of STMasterField down to 1get left of lastSlave&","&item 2 of loc of lastSlaveif it is within value ("rect of" &&theLayer&&"field"&&i) thenget theLayer&&"field id"&&value("id of"&&theLayer&&"field"&&i)put it into lastSlaveif STSlaveFields ≠ empty then put "," after STSlaveFieldsput it after STSlaveFieldsend ifend repeatif STSlaveFields = empty then answer "Scrolling table is disrupted."if STMasterField = empty then answer "Scrolling table is disrupted."end getSTFields</script>
</part>
<part>
<id>22</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>479</left>
<top>324</top>
<right>496</right>
<bottom>340</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name></name>
<script>on mouseStillDownhide me -- lets the click in the line below through to the big transparent buttonclick at mouseLoc() -- Just as though the user had clicked the mouse button againshow me -- ready for another callend mouseStillDown</script>
</part>
<part>
<id>23</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>479</left>
<top>103</top>
<right>496</right>
<bottom>219</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name></name>
<script>on mousedownglobal lastLocput mouseloc() into lastLoc -- capture this position for use in a drag operationset cursor to arrow -- 'cos that's how it is in the real scroll barend mousedownon mouseUpglobal lastLoc, STMasterField, STSlaveFieldsif STMasterField is empty or STSlaveFields is empty thengetSTFields name of meend ifhide me -- by hiding the transparent button, we let the 'drag' go through to the master field--lock screen -- optional; if you don't, the fields don't all scroll simultaneously,-- if you do, the scrolling is sluggishget mouseloc()drag from lastLoc to it -- this does the business on the master fieldrepeat with i = 1 to number of items in STSlaveFields -- set scroll of slave fields to the master field's scrolldo "set scroll of"&& item i of STSlaveFields&&"to scroll of"¬&&STMasterFieldend repeat--unlock screen -- see aboveshow me -- puts the transparent 'guard' back in placeend mouseUpon getSTFields guardButton-- the master field is the highest-numbered scrolling field-- in the same layer (card/background)-- that is under the guard button-- the slave fields are all of the scrolling fields of the same layer-- that underly the master field or the previous slave fieldglobal STMasterField, STSlaveFieldsif guardButton contains "card" then put "card" into theLayerelse put "background" into theLayerput empty into STSlaveFieldsput empty into STMasterFieldrepeat with i = 1 to value("number of"&&theLayer&&"fields")if loc of guardButton is within¬value ("rect of" &&theLayer&&"field"&&i) thenput theLayer&&"field id"&&value("id of"&&theLayer&&"field"&&i) ¬into STMasterFieldend ifend repeatput STMasterField into lastSlaverepeat with i = value("number of"&&STMasterField) down to 1get left of lastSlave&","&item 2 of loc of lastSlaveif it is within value ("rect of" &&theLayer&&"field"&&i) thenget theLayer&&"field id"&&value("id of"&&theLayer&&"field"&&i)put it into lastSlaveif STSlaveFields ≠ empty then put "," after STSlaveFieldsput it after STSlaveFieldsend ifend repeatif STSlaveFields = empty then answer "Scrolling table is disrupted."if STMasterField = empty then answer "Scrolling table is disrupted."end getSTFields</script>